package com.example.chinesenation.Config;

import com.example.chinesenation.Utils.CommonURL;
import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author sakuraFallingDown
 * @version 1.0
 * @date 2021/1/28 19:46
 */
@Configuration
public class ElasticSearchConfig {

    @Bean
    public RestHighLevelClient restHighLevelClient(){
        return new RestHighLevelClient(
                RestClient.builder(
                        new HttpHost("119.96.190.130",59200,"http")
                )
        );
    }
}
